package org.ghost.spring.cloud.registry.demo.controller;

import org.ghost.spring.cloud.registry.demo.dto.RspDTO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.ExecutionException;

@RestController
@RequestMapping(value = "demo")
public class DemoController extends BaseController {
    private final static Logger logger = LoggerFactory.getLogger(DemoController.class);

    @RequestMapping(value = "test1", method = RequestMethod.GET)
    public RspDTO get1() throws ExecutionException, InterruptedException {
        return this.render("test1张三");
    }

    @RequestMapping(value = "test2", method = RequestMethod.GET)
    public RspDTO get2() throws ExecutionException, InterruptedException {
        return this.render("test2李四");
    }

    @RequestMapping(value = "test3", method = RequestMethod.GET)
    public RspDTO get3() {
        return this.render("test3王五");
    }

    @RequestMapping(value = "test4", method = RequestMethod.GET)
    public RspDTO get4() {
        return this.render("test4测试");
    }
}

